function setCanvasStyle(size, map) {
    // 初始化canvas-style
    // 设置canvas的大小
    let canvas = document.createElement('canvas')
    // 绘制上下文
    let ctx = canvas.getContext('2d')
    // 设置画布
    canvas.width = size
    canvas.height = size
    // 设置的半径
    let radius = size / 4
    let increase = true
    function draw() {
        ctx.clearRect(0, 0, canvas.width, canvas.height)
        ctx.beginPath()
        ctx.arc(size / 2, size / 2, radius, 0, Math.PI * 2)
        ctx.closePath()
        ctx.fillStyle = 'lightblue'
        ctx.fill()

        // 固定圆
        ctx.beginPath()
        ctx.arc(size / 2, size / 2, size / 5, 0, Math.PI * 2)
        ctx.closePath()
        ctx.fillStyle = 'red'
        ctx.fill()
        if (radius > (size / 4) + (size / 4) / 5) {
            increase = false
        } else if (radius < (size / 4)) {
            increase = true
        }
        if (increase) {
            radius++
        } else {
            radius--
        }
        setTimeout(draw, 70)
        map.render()
    }
    draw()
    // 将创建的canvas元素作为openlayer的样式实现添加
    let style = new ol.style.Style({
        image: new ol.style.Icon({
            img: canvas,
            imgSize: [canvas.width, canvas.height]
        })
    })
    return style
}